#pragma once

#include "Import.h"
#include "CameraBase.h"
#include "OS.h"
#include "DxCamera.h"

class CFpsCamera : public CCameraBase
{
public:
	CFpsCamera();
	~CFpsCamera();

	void SetCameraData(CDxCamera* aCamera){ m_CameraData = aCamera; }

	void Move(float aOffsetX = 0.0f, float aOffsetY = 0.0f);
	void Rotate(D3DXVECTOR2 aFrom, D3DXVECTOR2 aTo);

	void ProcessUserInput(UINT aMessage, WPARAM aWParam, LPARAM aLParam);

	virtual void Logic( DWORD aDwTime );
	virtual void Render();

	D3DXMATRIX* GetViewMatrix(){ return m_CameraData->GetViewMatrix(); }
	D3DXMATRIX* GetProjMatrix(){ return m_CameraData->GetProjectMatrix(); }
private:
	CDxCamera*	m_CameraData;

	float		m_fMoveSpeed;
	DWORD		m_dwLastLogicTick;
	bool		m_bLMouseDown;
	D3DXVECTOR3	m_vMousePos;
};